﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArithmeticExpressionCalculator
{
    public class AtomOperation
    {
        double left;
        double right;
        char operation;
        public AtomOperation(double left, double right, char operation)
        {
            this.left = left;
            this.right = right;
            this.operation = operation;
        }
        public double Execute()
        {
            switch (operation)
            {
                case '+':
                    return left + right;
                case '-':
                    return left - right;
                case '*':
                    return left * right;
                case '/':
                    return left / right;
                default:
                    return 0;
            }
        }
    }
}
